import torch

def Eval(model, data_loader):
    for i, (data, label) in enumerate(data_loader):
        out = model.eval()(data)
        out = out.gt(0.5) * torch.ones_like(out)
        sorce = label.eq(out)
        acc = float(sorce.sum())/len(sorce)
        return acc




